package UI;
import java.util.ArrayList;

import COMP.TabTable;

public class PnlWall extends TabTable{
	static boolean[] editable = {false,false,false,false,false,false,false,false};
	static int[] colSize = {68,69,68,68,68,69,0,15};
	static String bgURL = "Img/outer_bg.png";
	static String headerURL = "Img/outer_header.png";
	
	private int selectedzone;
	
	public PnlWall(String name, String[] header,ArrayList<String[]> data){
		super(bgURL,headerURL,32,header,data,editable);
		this.setColWidth(colSize);
		this.setTableColWidth();
	}
	
	public void setZoneIndex(int index){
		this.selectedzone = index;
	}
	
	public void setwallData(String[] data,int rowIndex){
		int dataCount = data.length;
		for(int i = 0 ; i< dataCount;i++){
			this.getTable().setValueAt(data[i], rowIndex, i);
		}
		
		data[5] = Double.parseDouble(data[3])*Double.parseDouble(data[4])+"";
	}
}